﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace FieldDevice.UI
{
    public partial class DeviceConfigDialog : Form
    {
        Device Device;
        public DeviceConfigDialog(Device device)
        {
            InitializeComponent();
            this.propertyGrid1.SelectedObject = device.Config;
            this.Device = device;
        }

        private void SystemConfigDialog_Load(object sender, EventArgs e)
        {

        }

        private void btnSave_Click(object sender, EventArgs e)
        {
            DeviceManager.GlobalDeviceManager.Storage.SaveDeviceConfig(this.Device);
            
            MessageBox.Show("保存成功！");
            this.Close();
        }
    }
}
